import request from "@/utils/request";

export const queryAllApi = () => {
  return request.get("/depts");
};
export const addDeptApi = (dept) => {
  return request.post("/depts", dept);
};
export const queryDeptByIdApi = (id) => {
  return request.get(`/depts/${id}`);
};
export const updateDeptApi = (dept) => {
  return request.put("/depts", dept);
};
export const delDeptByIdApi = (id) => {
  return request.delete("/depts", {
    params: { id },
  });
};
